import time
import requests
import json
from conf.env import HIS_URL


if __name__ == '__main__':
    # 通过明文登录接口获取token
    bizCode = 'PlaintextUserLogin'    # 根据用户名获取token
    # bizCode = 'CPOEGetMedicineDictionary'  #获取药品字典信息
    HIS_URL += bizCode
    data_={
        "name":10001,
        "organizationId":1001001,
        "password":"123456"
    }

    res_=requests.post(HIS_URL,data=data_)

    print(type(res_))
    print(res_.status_code)
    print(res_.content)
    data_ = json.loads(res_.text)
    print(type(data_))
    print(data_)